def fact(i)
  i <= 1? 1 : i * fact(i-1)
end

sum = 0
for i in "#{fact 100}".split("")
  sum += i.to_i
end
puts "#{sum}"